-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Station Only Glimmer Mites #976
base: master
Are you sure you want to change the base?
Station Only Glimmer Mites #976
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(The suggestions are done with LINQ, you will have to add a using
directive for it if your IDE doesn't add it automatically)
var glimmerSources = new List<(GlimmerSourceComponent, TransformComponent)>(); | ||
foreach (var source in EntityQuery<GlimmerSourceComponent, TransformComponent>().ToList()) | ||
{ | ||
if (source.Item2.GridUid != Transform(station[0]).GridUid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (source.Item2.GridUid != Transform(station[0]).GridUid) | |
if (station.All(it => Transform(it).GridUid != source.Item2.GridUid)) |
var normalSpawnLocations = new List<(VentCritterSpawnLocationComponent, TransformComponent)>(); | ||
foreach (var source in EntityQuery<VentCritterSpawnLocationComponent, TransformComponent>().ToList()) | ||
{ | ||
if (source.Item2.GridUid != Transform(station[0]).GridUid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (source.Item2.GridUid != Transform(station[0]).GridUid) | |
if (station.All(it => Transform(it).GridUid != source.Item2.GridUid)) |
var hiddenSpawnLocations = new List<(MidRoundAntagSpawnLocationComponent, TransformComponent)>(); | ||
foreach (var source in EntityQuery<MidRoundAntagSpawnLocationComponent, TransformComponent>().ToList()) | ||
{ | ||
if (source.Item2.GridUid != Transform(station[0]).GridUid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... see above
Description
This PR makes it so that Glimmer Mites can only spawn on "The Main Station", as defined by GetSpawnableStations. Yes this is seemingly pretty hardcodey, but because on our codebase it's simply not possible for GetSpawnableStations to ever return anything other than a list with an index of 0, we can extremely reliably count on GetSpawnableStations()[0] to be "THE Station".
This fixes an issue whereby Glimmer Mites can spawn in places where it is simply not possible for players to reach them. Such as random asteroids in space, CENTCOMM, Nukie World, or the Syndicate Listening Outpost.
Changelog
🆑